/*
Copyright 2005-2014 CP Fricano - All Rights Reserved

This software and source code is licensed under the Apache
License, Version 2.0. You may not use this software or source
code except in compliance with the License.  You may obtain a
copy of the License at: http://www.apache.org/licenses/LICENSE-2.0.
Use and distributed under this License is on an "as is" basis,
without expressed or implied warranties or conditions of any kind.
See the License for the specific language governing permissions and
limitations.
 */

package com.fricano.java42.instructional.example.time.tester;

import java.awt.Container;
import java.awt.event.ActionEvent;

import javax.swing.JButton;
import javax.swing.JFrame;

import com.fricano.java42.sequencer.J42Helper;
import com.fricano.java42.sequencer.J42Listener;
import com.fricano.java42.sequencer.J42Sequencer;

public class TimerResolution_Tester_01 {

    public static void main(final String[] args) throws Exception {

        new J42Sequencer<JFrame>() {

            @Override
            public void doSequence0_CreateComponents(final JFrame window, final Container contentPane, final J42Helper<JFrame> helper) {
            }

            @Override
            public void doSequence1_AddComponents(final JFrame client, final Container contentPane, final J42Helper<JFrame> helper) {

                helper.addJButton(contentPane, "Clock Resolution", new J42Listener<JButton, ActionEvent>() {

                    @Override
                    public void doWorkOutsideEDT(final JButton t, final ActionEvent eventObject) throws Exception {
                    }

                    @Override
                    public void doWorkInsideEDT(final JButton t, final ActionEvent eventObject) throws Exception {
                    }

                });
            }

            @Override
            public void doSequence2_LocateSizePackShow(final JFrame window, final Container contentPane, final J42Helper<JFrame> helper) {
                window.setLocationRelativeTo(null);
                window.setVisible(true);
            }

            @Override
            public void doSequence3_StartApplication(final JFrame window, final Container contentPane, final J42Helper<JFrame> helper) {
            }

            @Override
            public void doSequence9_StopApplication(final JFrame window, final Container contentPane, final J42Helper<JFrame> helper) {
                System.exit(0);
            }
        };

    }

}
